const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

module.exports = {
    lintOnSave: false,
    configureWebpack: {
        plugins: [
            AutoImport({
                resolvers: [ElementPlusResolver()],
            }),
            Components({
                resolvers: [ElementPlusResolver()],
            }),
        ],
    },
    chainWebpack: config => {
        config.module
          .rule('md')
          .test(/\.md/)
          .use('html-loader')
          .loader('html-loader')
          .end()
          .use('markdown-loader')
          .loader('markdown-loader')
          .end()
      },
    devServer:{  
        port:8088, 
        proxy:{      
            '/api':{
                // target:'http://47.108.94.220:8080/',
                target:'http://192.168.100.104:7777/',
                ws:true,
                changeOrigin:true,//开启代理
                pathRewrite:{
                    '^/api':''
                },
            }
        }
    }

}

